%dXt = sigma(t)dW 
%sigma(t)=OU
clear all
% index J for X
alphaK=20; betaK=15; 
% time T
T = 1/2;
% time mesh 
num=50; tspan = linspace(0,T,num+1);
%sigma
sm = mihandle; sw = wihandle;
%options = odeset('AbsTol',1e-12,'RelTol',1e-6);
options = [];
row=(betaK+1)*(alphaK+1); X0=zeros(row,1); 
% solver of X
disp('solving X')
tic
[time,X] = ode45(@randucbmdw,tspan,X0,options,T,alphaK,betaK,sm,sw);
toc
varitest(time,X.*X,T,'uncorrelated','oudt',num)